package oop.java0324.multidiver;

/**
 * 轮船有载重、排水量、航速等属性，有起航，鸣笛、抛锚等方法
 */
public class Ship {
    int load;//载重
    int tonage;//排水量
    int speed;//航速

    public Ship(int load, int tonage, int speed) {
        this.load = load;
        this.tonage = tonage;
        this.speed = speed;
    }

    public void start() {
        System.out.println("起航");
    }

    public void ring() {
        System.out.println("鸣笛");
    }

    public void stop() {
        System.out.println("抛锚");
    }

    public void showInfo() {
        System.out.println("这款豪华邮轮载重达到" + load + ",排水量达到" + tonage + ",航速最高" + speed + "节");
    }
}
